package edu.spec.dengyan.week05.class02.home01;

class Mammal extends Animal{

    public Mammal()
    {

    }

    public Mammal(String name,String gender,int age,String food)
    {

        super(name,gender,age,food);

    }

    public void eatFood()
    {
        System.out.println(getName() + "吃肉和喝水。");
    }

    public void born()
    {
        System.out.println("我出生在父母的怀抱");
    }

    public static void main(String[] args)
    {
        Animal b=new Animal("麻雀","雌性",2,"毛毛虫");
        b.eat();
        b.breed();
        Mammal R=new Mammal("蓝猫","雌性",1,"老鼠");//"豆豆","雄性",3,"阿拉斯加"
        R.eatFood();
        R.breed();
        R.born();
    }


}
